﻿CREATE TABLE [ApplicationInformation] (
[Id] INTEGER  PRIMARY KEY NOT NULL,
[Version] VARCHAR(25)  NOT NULL,
[CreatedDate] TIME  NOT NULL,
[UserSessionId] varchar(40)  NOT NULL,
[WorkingSet] integer  NOT NULL
);

CREATE TABLE [ExceptionInformation] (
[Id] INTEGER  PRIMARY KEY NOT NULL,
[CallStack] varchar(2500)  NOT NULL,
[ExceptionName] varchar(100)  NOT NULL,
[Message] varchar(200)  NOT NULL,
[EmailAddress] varchar(200)  NULL,
[ErrorDescription] varchar(1000)  NULL,
[CreatedDate] time  NOT NULL,
[SystemInfoId] integer  NOT NULL
);

CREATE TABLE [FeatureUsageInformation] (
[Id] INTEGER  PRIMARY KEY NOT NULL,
[FeatureUsageRecordId] integer  NOT NULL,
[FeatureName] VARCHAR(255)  NOT NULL,
[UsageCount] integer  NOT NULL
);

CREATE TABLE [FeatureUsageRecord] (
[Id] INTEGER  NOT NULL PRIMARY KEY,
[SystemInfoId] integer  NOT NULL,
[ApplicationInfoId] integer  NOT NULL,
[CreatedDate] time  NOT NULL
);

CREATE TABLE [SystemInformation] (
[Id] INTEGER  PRIMARY KEY NOT NULL,
[OperatingSystem] varchar(255)  NOT NULL,
[IsTabletPC] BOOLEAN  NOT NULL,
[ScreenWidth] integer  NOT NULL,
[ScreenHeight] INTEGER  NOT NULL,
[RenderCapabilityTier] INTEGER  NOT NULL,
[IsSlowMachine] BOOLEAN  NOT NULL,
[ProcessorCount] INTEGER  NOT NULL,
[ProcessorArchitecture] varchar(20)  NULL,
[CreatedDate] time  NOT NULL,
[UserNameHash] integer  NOT NULL,
[MachineNameHash] integer  NOT NULL,
[DomainHash] integer  NOT NULL,
[CLRVersion] varchar(40)  NOT NULL,
[PhysicalMemory] INTEGER  NOT NULL
);
